# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sngrep
pkgver=1.8.3
pkgrel=0
pkgdesc="display SIP call message flows from a terminal"
url="https://github.com/irontec/sngrep"
arch="all !ppc64le"
license="GPL-3.0-or-later"
depends="sed"
makedepends="autoconf automake ncurses-dev libpcap-dev
	pcre-dev libgcrypt-dev openssl-dev"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/irontec/sngrep/releases/download/v$pkgver/sngrep-$pkgver.tar.gz"

prepare() {
	default_prepare
	./bootstrap.sh
}

build() {
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc \
		--with-openssl \
		--with-pcre \
		--disable-logo \
		--enable-unicode \
		--enable-ipv6
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir/" install
}

sha512sums="d3aabe22a31ec5860ec80f94b6556d345d72574e552c4e92dfebdddeaaa5f69caf811fc2fa201ca7af24cabfcbdd530a4f50248ebf0381cef26390a78824d1af sngrep-1.4.10.tar.gz"
